home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Science / Asymptote Demo / Examples / Demos / 12) GSC star chart / setupGSCchart < prev   
Encoding:
Text File  |  1994-05-07  |  1.3 KB  |  53 lines  |  [TEXT/DWat]

  1. % Plot a field from the Guide Star Catalog on CD-ROM
  2. % ARGUMENTS: RAh RAm RAs DECsign DECd DECm DECs FieldSize
  3.  
  4. % This script sets up the graphlimits and draws a frame
  5. % with RA, DEC tick marks.
  6. %
  7. % The arguments are the field center (RA, DEC) and FieldSize
  8. % in decimal arc minutes.  DECsign is +1 or -1 for north or south.
  9. % (This is done to avoid the problems with -0 and +0) 
  10.  
  11. clear
  12.  
  13. graphunits in
  14. graphframe 2 7 2 7
  15.  
  16. % Save these values in case we want to use them later
  17. set RAh        &1
  18. set RAm        &2
  19. set RAs        &3
  20. set DECsign &4
  21. set DECd     &5
  22. set DECm     &6
  23. set DECs     &7
  24. set FLDsize &8
  25. set FLDsize FLDsize 60 /
  26.  
  27. % DECcen = RA of field center in decimal degrees
  28. set DECcen DECs 60 / DECm + 60 / DECd + DECsign *
  29. % RAcen = RA of field center in decimal degrees
  30. set RAcen RAs 60 / RAm + 60 / RAh +
  31.  
  32. set DECoffset FLDsize 2 /
  33. set RAoffset FLDsize 2 / 15 / DECcen deg cos /
  34.  
  35. graphlimits RAcen RAoffset + RAcen RAoffset - DECcen DECoffset - DECcen DECoffset + 
  36. graphticks RAoffset 8 / RAoffset 2 / DECoffset 8 / DECoffset 2 /
  37.  
  38. pensize 1
  39. notation hhmmss
  40. digits 0
  41. drawaxis bottom inside outside line inside parallel
  42. drawaxis top inside outside line inside nolabels
  43. notation ddmmss
  44. drawaxis left inside outside line inside perpendicular
  45. drawaxis right inside outside line inside nolabels
  46. notation general
  47.  
  48. drawxlabel Right Ascension (2000)
  49. drawylabel Declination (2000)
  50.  
  51. close
  52.  
  53.